package com.dameng.work.service.impl;

import com.dameng.work.dao.T03Dao;
import com.dameng.work.dao.TCEDao;
import com.dameng.work.pojo.T03;
import com.dameng.work.pojo.TCE;
import com.dameng.work.service.T03Service;
import com.dameng.work.service.TCEService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.HashMap;
import java.util.List;


/**
 CREATE TABLE "SYSDBA"."T03"
 (
 "ID" NUMBER(22,6),
 "DATE_TIME" TIMESTAMP(0)) STORAGE(ON "MAIN", CLUSTERBTR) ;
 */
@Service
public class TCEServiceImpl implements TCEService {


    @Autowired
    private TCEDao tCEDao;


    @Override
    public List<TCE> findAllByDate() {

        HashMap<String, Object> stringDateHashMap = new HashMap<>();
        stringDateHashMap.put("begintime",new Date());
        List<TCE> allTCE = tCEDao.findTCEByCreateDate(stringDateHashMap);

        return allTCE;
    }

    @Override
    public List<TCE> findAllByDate1() {
        HashMap<String, Object> stringDateHashMap = new HashMap<>();
        stringDateHashMap.put("begintime",new Date());
        List<TCE> allTCE = tCEDao.findTCEByCreateDate1(stringDateHashMap);

        return allTCE;
    }


}
